﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using TaoPortal.Common;

namespace TaoPortal.Areas.Admin.Models
{
    public class PluginModel : BaseModel
    {
        public string PluginClass { get; set; }

        public PluginModel()
        {
            PluginClass = "[]";
        }

        public void InitPluginClass()
        {
            var classList = GetClassByType(TaoPortal.Common.SysEnum.SysClassType.PluginType);
            PluginClass = TaoPortal.Common.Utility.JsonSerialization.SerializeObject(classList.Select(x => new { text = x.text, value = x.id }));
        }

    }
}